﻿using IOP.Pulsar.Abstractions;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System;
using System.Collections.Generic;
using System.Text;

namespace IOP.Pulsar.Server
{
    /// <summary>
    /// 服务端容器构建者接口
    /// </summary>
    public interface IPulsarHostBuilder
    {
        /// <summary>
        /// 构建
        /// </summary>
        void Build();
        /// <summary>
        /// 配置服务
        /// </summary>
        /// <param name="configureServices"></param>
        /// <returns></returns>
        IPulsarHostBuilder ConfigureServices(Action<IServiceCollection> configureServices);
        /// <summary>
        /// 配置服务
        /// </summary>
        /// <param name="configureServices"></param>
        /// <returns></returns>
        IPulsarHostBuilder ConfigureServices(Action<HostBuilderContext, IServiceCollection> configureServices);
        /// <summary>
        /// 配置服务器
        /// </summary>
        /// <param name="builder"></param>
        /// <returns></returns>
        IPulsarHostBuilder Configure(Action<IServerBuilder, IHostEnvironment> builder);
    }
}
